package com.ruoyi.business.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.IndicatorDetailMapper;
import com.ruoyi.business.domain.IndicatorDetail;
import com.ruoyi.business.service.IIndicatorDetailService;

/**
 * 指标明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-01
 */
@Service
public class IndicatorDetailServiceImpl  extends BaseServiceImpl implements IIndicatorDetailService
{
    @Autowired
    private IndicatorDetailMapper indicatorDetailMapper;

    /**
     * 查询指标明细
     * 
     * @param id 指标明细主键
     * @return 指标明细
     */
    @Override
    public IndicatorDetail selectIndicatorDetailById(Long id)
    {
        return indicatorDetailMapper.selectIndicatorDetailById(id);
    }

    /**
     * 查询指标明细列表
     * 
     * @param indicatorDetail 指标明细
     * @return 指标明细
     */
    @Override
    public List<IndicatorDetail> selectIndicatorDetailList(IndicatorDetail indicatorDetail)
    {
        return indicatorDetailMapper.selectIndicatorDetailList(indicatorDetail);
    }

    /**
     * 新增指标明细
     * 
     * @param indicatorDetail 指标明细
     * @return 结果
     */
    @Override
    public int insertIndicatorDetail(IndicatorDetail indicatorDetail)
    {
        indicatorDetail.setCreateTime(DateUtils.getNowDate());
        return indicatorDetailMapper.insertIndicatorDetail(indicatorDetail);
    }

    /**
     * 修改指标明细
     * 
     * @param indicatorDetail 指标明细
     * @return 结果
     */
    @Override
    public int updateIndicatorDetail(IndicatorDetail indicatorDetail)
    {
        indicatorDetail.setUpdateTime(DateUtils.getNowDate());
        return indicatorDetailMapper.updateIndicatorDetail(indicatorDetail);
    }

    /**
     * 批量删除指标明细
     * 
     * @param ids 需要删除的指标明细主键
     * @return 结果
     */
    @Override
    public int deleteIndicatorDetailByIds(Long[] ids)
    {
        return indicatorDetailMapper.deleteIndicatorDetailByIds(ids);
    }

    /**
     * 删除指标明细信息
     * 
     * @param id 指标明细主键
     * @return 结果
     */
    @Override
    public int deleteIndicatorDetailById(Long id)
    {
        return indicatorDetailMapper.deleteIndicatorDetailById(id);
    }
}
